package cn.jsj.hzu.qm.facecloud.ciuser.pojo;

import java.util.Objects;

import com.alibaba.fastjson.annotation.JSONField;

public class Ciuser implements ToJsonString{
	//注意，加入了对阿里FastJson的支持
	
	@JSONField(name = "id")
	private int id;
	@JSONField(name = "sid")
	private String sid;
	@JSONField(name = "name")
	private String name;
	
	// 注意 前端不可以查询password，所以json里面没有
	// @JSONField(name = "password")
	private String password;

	@JSONField(name = "email")
	private String email;
	@JSONField(name = "is_available")
	private int is_available;
	@JSONField(name = "type")
	private int type;

	@JSONField(name = "memo")
	private String memo;
	@JSONField(name = "regtime")
	private String regtime;
	@JSONField(name = "modifytime")
	private String modifytime;

	@JSONField(name = "jsonmessage")
	private String jsonmessage;

	@JSONField(name = "photoPath")
	private String photoPath;

	@JSONField(name = "activation_code")
	private String activation_code;
	@JSONField(name = "activation_code_end")
	private String activation_code_end;
	@JSONField(name = "number_of_times")
	private int number_of_times;
	@JSONField(name = "pass_by")
	private String pass_by;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getSid() {
		return sid;
	}

	public void setSid(String sid) {
		this.sid = sid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public int getIs_available() {
		return is_available;
	}

	public void setIs_available(int is_available) {
		this.is_available = is_available;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	/**
	 * 注意：此时的Memo内容为为管理员授权实验室名。
	 * */
	public String getMemo() {
		return memo;
	}

	/**
	 * 注意：此时的Memo内容为为管理员授权实验室名。
	 * */
	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getRegtime() {
		return regtime;
	}

	public void setRegtime(String regtime) {
		this.regtime = regtime;
	}

	public String getModifytime() {
		return modifytime;
	}

	public void setModifytime(String modifytime) {
		this.modifytime = modifytime;
	}

	public String getJsonmessage() {
		return jsonmessage;
	}

	public void setJsonmessage(String jsonmessage) {
		this.jsonmessage = jsonmessage;
	}

	public String getPhotoPath() {
		return photoPath;
	}

	public void setPhotoPath(String photoPath) {
		this.photoPath = photoPath;
	}

	public String getActivation_code() {
		return activation_code;
	}

	public void setActivation_code(String activation_code) {
		this.activation_code = activation_code;
	}

	public String getActivation_code_end() {
		return activation_code_end;
	}

	public void setActivation_code_end(String activation_code_end) {
		this.activation_code_end = activation_code_end;
	}

	public int getNumber_of_times() {
		return number_of_times;
	}

	public void setNumber_of_times(int number_of_times) {
		this.number_of_times = number_of_times;
	}

	public String getPass_by() {
		return pass_by;
	}

	public void setPass_by(String pass_by) {
		this.pass_by = pass_by;
	}

	@Override
	public String toString() {
		return "Ciuser [id=" + id + ", sid=" + sid + ", name=" + name + ", password=" + password + ", email=" + email
				+ ", is_available=" + is_available + ", type=" + type + ", memo=" + memo + ", regtime=" + regtime
				+ ", modifytime=" + modifytime + ", jsonmessage=" + jsonmessage + ", photoPath=" + photoPath
				+ ", activation_code=" + activation_code + ", activation_code_end=" + activation_code_end
				+ ", number_of_times=" + number_of_times + ", pass_by=" + pass_by + "]";
	}

	public Ciuser() {
		super();
		this.id = -1;
		this.sid = "";
		this.name = "";
		this.password = "";
		this.email = "";
		this.is_available = 0;
		this.type = -1;
		this.memo = "";
		this.regtime = "";
		this.modifytime = "";
		this.jsonmessage = "";
		this.photoPath = "";
		this.activation_code = "";
		this.activation_code_end = "";
		this.number_of_times = 0;
		this.pass_by = "";
	}

	@Override
	public int hashCode() {
		return Objects.hash(activation_code, activation_code_end, email, id, is_available, jsonmessage, memo,
				modifytime, name, number_of_times, pass_by, password, photoPath, regtime, sid, type);
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Ciuser other = (Ciuser) obj;
		return Objects.equals(activation_code, other.activation_code)
				&& Objects.equals(activation_code_end, other.activation_code_end) && Objects.equals(email, other.email)
				&& id == other.id && is_available == other.is_available
				&& Objects.equals(jsonmessage, other.jsonmessage) && Objects.equals(memo, other.memo)
				&& Objects.equals(modifytime, other.modifytime) && Objects.equals(name, other.name)
				&& number_of_times == other.number_of_times && Objects.equals(pass_by, other.pass_by)
				&& Objects.equals(password, other.password) && Objects.equals(photoPath, other.photoPath)
				&& Objects.equals(regtime, other.regtime) && Objects.equals(sid, other.sid) && type == other.type;
	}

	public Ciuser(int id, String sid, String name, String password, String email, int is_available, int type,
			String memo, String regtime, String modifytime, String jsonmessage, String photoPath,
			String activation_code, String activation_code_end, int number_of_times, String pass_by) {
		super();
		this.id = id;
		this.sid = sid;
		this.name = name;
		this.password = password;
		this.email = email;
		this.is_available = is_available;
		this.type = type;
		this.memo = memo;
		this.regtime = regtime;
		this.modifytime = modifytime;
		this.jsonmessage = jsonmessage;
		this.photoPath = photoPath;
		this.activation_code = activation_code;
		this.activation_code_end = activation_code_end;
		this.number_of_times = number_of_times;
		this.pass_by = pass_by;
	}
	
	
	
}
